From ed1bfa9fe0a37c0cd873064955ae56da39264dac Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Fri, 19 Dec 2003 22:29:12 +0000 Subject: [PATCH] bitkeeper revision 1.653 (3fe37bb8JkaTBzrrWzReULGfBXkwYQ) dom0_ops.c, Makefile: Bug fixes to dom0 interface. --- tools/xc/lib/Makefile | 4 ++-- xen/common/dom0_ops.c | 47 ++++++++++++++++++++++--------------------- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/tools/xc/lib/Makefile b/tools/xc/lib/Makefile index c19643e8fb..2693372048 100644 --- a/tools/xc/lib/Makefile +++ b/tools/xc/lib/Makefile @@ -22,7 +22,7 @@ install: all mkdir -p /usr/lib mkdir -p /usr/include cp -a $(LIB) /usr/lib - chmod 755 /usr/bin/$(LIB) + chmod 755 /usr/lib/$(LIB) cp -a xc.h /usr/include chmod 644 /usr/include/xc.h @@ -30,7 +30,7 @@ dist: all mkdir -p ../../../../install/lib mkdir -p ../../../../install/include cp -a $(LIB) ../../../../install/lib - chmod 755 ../../../../install/bin/$(LIB) + chmod 755 ../../../../install/lib/$(LIB) cp -a xc.h ../../../../install/include chmod 644 ../../../../install/include/xc.h diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c index 2f3073a1c4..da6c39379a 100644 --- a/xen/common/dom0_ops.c +++ b/xen/common/dom0_ops.c @@ -104,8 +104,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op) ret = -EINVAL; if ( p != NULL ) { - if ( (ret = final_setup_guestos(p, &op.u.builddomain)) == 0 ) - ret = p->domain; + ret = final_setup_guestos(p, &op.u.builddomain); put_task_struct(p); } } @@ -121,7 +120,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op) { wake_up(p); reschedule(p); - ret = p->domain; + ret = 0; } put_task_struct(p); } @@ -191,40 +190,42 @@ long do_dom0_op(dom0_op_t *u_dom0_op) ret = -EINVAL; if ( p != NULL ) { - if( cpu == -1 ) - p->cpupinned = 0; - else - { + if ( cpu == -1 ) + { + p->cpupinned = 0; + ret = 0; + } + else + { /* For the moment, we are unable to move running - domains between CPUs. (We need a way of synchronously - stopping running domains). For now, if we discover the - domain is not stopped already then cowardly bail out - with ENOSYS */ + domains between CPUs. (We need a way of synchronously + stopping running domains). For now, if we discover the + domain is not stopped already then cowardly bail out + with ENOSYS */ if( !(p->state & TASK_STOPPED) ) - ret = -ENOSYS; - else - { + { + ret = -ENOSYS; + } + else + { /* We need a task structure lock here!!! FIX ME!! */ cpu = cpu % smp_num_cpus; p->processor = cpu; p->cpupinned = 1; - } - } - - ret = 0; + ret = 0; + } + } put_task_struct(p); - } - + } } break; case DOM0_BVTCTL: { unsigned long ctx_allow = op.u.bvtctl.ctx_allow; - ret = sched_bvtctl(ctx_allow); - + ret = sched_bvtctl(ctx_allow); } break; @@ -407,7 +408,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op) case DOM0_MSR: { - if (op.u.msr.write) + if ( op.u.msr.write ) { msr_cpu_mask = op.u.msr.cpu_mask; msr_addr = op.u.msr.msr; -- 2.30.2